package com.ryan.mms.privilage.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.ryan.framework.model.Model;

/**
 * Applications entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "applications", catalog = "framework")
public class Application implements Model{

	private static final long serialVersionUID = 1L;

	// Fields

	private Long applicationId;
	private String applicationName;
	private String applicationDescription;

	// Constructors

	/** default constructor */
	public Application() {
	}

	/** minimal constructor */
	public Application(String applicationName) {
		this.applicationName = applicationName;
	}

	/** full constructor */
	public Application(String applicationName, String applicationDescription) {
		this.applicationName = applicationName;
		this.applicationDescription = applicationDescription;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "application_id", unique = true, nullable = false)
	public Long getApplicationId() {
		return this.applicationId;
	}

	public void setApplicationId(Long applicationId) {
		this.applicationId = applicationId;
	}

	@Column(name = "application_name", nullable = false, length = 50)
	public String getApplicationName() {
		return this.applicationName;
	}

	public void setApplicationName(String applicationName) {
		this.applicationName = applicationName;
	}

	@Column(name = "application_description", length = 1024)
	public String getApplicationDescription() {
		return this.applicationDescription;
	}

	public void setApplicationDescription(String applicationDescription) {
		this.applicationDescription = applicationDescription;
	}

}